package com.chen;

import java.util.Scanner;

public class TestStudent {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        StudentController controller = new StudentController(sc);

        while (true) {
            System.out.println("==========学生管理系统==============");
            System.out.println("1. 添加学生");
            System.out.println("2. 删除学生");
            System.out.println("3. 修改学生");
            System.out.println("4. 根据学生ID查询学生");
            System.out.println("5. 显示所有学生");
            System.out.println("6. 退出系统");
            System.out.println("请输入您的选择：");
            int type = sc.nextInt();
            switch (type) {
                case 1:
                    controller.addStudent();
                    break;
                case 2:
                    controller.deleteStudent();
                    break;
                case 3:
                    controller.updateStudent();
                    break;
                case 4:
                    controller.getStudentById();
                    break;
                case 5:
                    controller.getAllStudent();
                    break;
                case 6:
                    System.out.println("谢谢使用!");
                    return;
                default:
                    System.out.println("输入错误，请重新输入");
            }
        }
    }
}
